package com.linln.admin.app.domain;

import com.linln.common.utils.StatusUtil;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author taofucheng
 * @date 2022/01/12
 */
@Data
@Entity
@Table(name="app_production_line")
@EntityListeners(AuditingEntityListener.class)
@Where(clause = StatusUtil.NOT_DELETE)
@DynamicInsert
@DynamicUpdate
public class ProductionLine implements Serializable {
    //
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private Long id;
    // 产品线名称
    private String title;
    // 简要说明
    private String descript;
    // 状态。1-正常；2-冻结；3-删除
    private Byte status;
}